
function chat(Sequence){
	var sequence = Sequence;
	window.location.href ="/TeaCulture/chat?sequence="+sequence+"";
}
function deleteFriend(sequence){
	var usersequence = $("#usersequence").val();
	$.ajax({
	   	 type : "post",
	        url : "/TeaCulture/friendlist/deleteFriend",
	        data : { "sequence" : sequence,"usersequence":usersequence},
	        dataType : "json",
	        traditional : true,
	        success : function(result){
	       	 if (result.result.code === "1") {
	       		 layer.msg("好友已被删除！", {icon: 6});
	       		 location.reload();
	       	 }else{
	       		 layer.msg(data.result.des, {icon: 5});
	       	 }
	       },    
	       error : function(result){
	       		layer.msg(data.result.des, {icon: 5});
	       }
	   });
}
function play(sequence){
	var usersequence = $("#usersequence").val();
	layer.prompt({
		  title: "请输入您要发送的申请信息", //提示框标题
		},function(message, index, elem){
			
		  layer.close(index);
	    $.ajax({
		   	 type : "post",
		        url : "/TeaCulture/friendlist/play",
		        data : { "sequence" : sequence,"message":message,"usersequence":usersequence},
		        dataType : "json",
		        traditional : true,
		        success : function(result){
		       	 if (result.result.code === "1") {
		      		 layer.msg("向对方发送邀请成功！", {icon: 6});
		       	 }else{
		       		 layer.msg(result.result.des, {icon: 5});
		       	 }
		       },    
		       error : function(result){
		       	 layer.msg(result.result.des, {icon: 5});
		       }
		   });
		})
}
